<?php

class Testing extends Controller {

	function index()
	{
        // forms
        $this->load->helper(array('url', 'form', 'cisrf'));

        // set validation rules
        $this->form_validation->set_rules(cisrf_token_name(), 'CSRF token' , 'required|callback__cisrf_token_is_valid');
        $this->form_validation->set_rules('test', 'Test', 'required');        
        if ($this->form_validation->run() === FALSE) {
            $this->load->view('testing');
        } else {
            $this->load->view('testing_success');
        }
	}

    function _cisrf_token_is_valid() {
        return cisrf_token_is_valid();
    }
}

/* End of file testing.php */
/* Location: ./system/application/controllers/testing.php */
